home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Input 64
/
Input_64_85-08_1985_Verlag_Heinz_Weise_de.d64
/
C O
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
7KB
|
311 lines
10 ifpeek(50307)=120thenpoke50257,0
100 rem ***************
110 rem c o l o r code
120 rem ***************
130 rem juni 1985 by
140 rem ***************
150 rem wolfgang gachot
160 rem
170 rem
180 rem ***************
190 rem initialisierung
200 poke788,52
205 fori=0to23:poke54272+i,0:next
210 dimfx(14),fv(14)
220 data 103,17,237,21,20,26,109,16,178,20,157,24,129,15,137,19,59,23,109,16
230 data 178,20,157,24
240 tr$=chr$(144)+"[214] ":rf$=chr$(5)+"[214] "
250 cs=58640:bs=1119:fs=55391:vic=53248:sid=54272:h=0:ad=1065:fl=0
260 gosub 3540:rem alle stimmen aus
270 pokesid+24,15 :rem lautstaerke einstellen
280 fori=5 to 19step7 :rem adsr einstellen
290 pokesid+i,16:pokesid+i+1,200
300 next
310 poke53280,15:poke53281,15:printchr$(142);chr$(8);chr$(151) :rem farben
320 gosub 2430:rem titelbild
330 h=0:fw$(1)=chr$(144)+chr$(18)+" s "+chr$(146)+" schwarz"
340 fw$(2)=chr$(154)+chr$(18)+" b "+chr$(146)+" blau"
350 fw$(3)=chr$(150)+chr$(18)+" r "+chr$(146)+" rot"
360 fw$(4)=chr$(129)+chr$(18)+" o "+chr$(146)+" orange"
370 fw$(5)=chr$(5)+chr$(18)+" w "+chr$(146)+" weiss"
380 fw$(6)=chr$(156)+chr$(18)+" v "+chr$(146)+" violett"
390 fw$(7)=chr$(158)+chr$(18)+" g "+chr$(146)+" gelb"
400 rem sprite initialisieren
410 fori=0to62:poke704+i,0:next
420 fori=1to24:readdw:next
430 fori=0to24step3:readda:poke704+i,da:next
440 data 24,60,126,219,24,24,24,24,24
450 poke2040,11:pokevic+39,1
460 pokevic,160:pokevic+1,90
470 gosub3540
480 if fl then gosub2890:goto520
490 gosub2830:rem abfrage auf anleitung und schwierigkeitsgrad
500 rem*********************************
510 rem spielfeldaufbau
520 print chr$(147)
530 pokead,3 :pokead+sid,14 :rem c
540 pokead+2,15:pokead+sid+2,1 :rem o
550 pokead+4,12:pokead+sid+4,10:rem l
560 pokead+6,15:pokead+sid+6,7 :rem o
570 pokead+8,18:pokead+sid+8,4 :rem r
580 printchr$(151)
590 poke211,2:poke214,3:syscs:print"c o d e"
600 poke211,2:poke214,6:syscs:print"stufe";sg+1
610 fori=1to7
620 poke211,1:poke214,i*2+8:sys cs
630 print fw$(i)
640 next
650 printchr$(151);chr$(19);
660 printtab(16)"[213][195][178][195][178][195][178][195][178][195][201]"
670 printtab(16)"[194]?[194]?[194]?[194]?[194]?[194]"
680 printtab(16)"[171][195][177][195][177][195][177][195][177][195][179]"
690 printtab(16)"[171][195][178][195][178][195][178][195][178][195][179]"
700 fori=1to 9
710 printtab(16)"[194] [194][160][194][160][194][160][194][160][194]"
720 printtab(16)"[171][195][219][195][219][195][219][195][219][195][179]"
730 next
740 printtab(16)"[194] [194][160][194][160][194][160][194][160][194]"
750 printtab(16)"[202][195][177][195][177][195][177][195][177][195][203]"
760 rem*********************************
770 rem code zufaellig festlegen
780 fori=1to5:x(i)=3
790 z=int(rnd(1)*9):ifz=3orz=5then790
800 ifz=2thenz=10
810 ifz=6then z=14
820 j=1
830 ifz=x(j)then fl=fl+1
840 iffl>sgthen fl=fl-1:goto 790
850 ifj<ithen j=j+1:goto830
860 x(i)=z
870 next
880 rem*********************************
890 rem hauptschleife
900 ve=0 :rem versuchszaehler
910 ez=0 :rem eingabezaehler
920 ve=ve+1 : ifve>10 then 2340
930 ez=ez+1+(ez>4)
940 pokevic+1,74+ve*16:pokevic,144+ez*16
950 pokevic+21,1:rem sprite ein
960 poke198,0:wait 198,1
970 gett$:rem tastaturabfrage
980 ift$="s"thenfc= 0:goto1110
990 ift$="w"thenfc= 1:goto1110
1000 ift$="b"thenfc=14:goto1110
1010 ift$="r"thenfc=10:goto1110
1020 ift$="o"thenfc= 8:goto1110
1030 ift$="v"thenfc= 4:goto1110
1040 ift$="g"thenfc= 7:goto1110
1050 ift$="h"then h=h+1+(h>4):gosub2280
1060 ift$=chr$(157)then ez=ez-1-(ez<2):goto940:rem cursor left
1070 ift$=chr$(29)then ez=ez+1+(ez>4):goto940:rem cursor right
1080 ift$=chr$(13) then 1160:rem return
1100 goto970
1110 poke bs+ve*80+ez*2,160 :rem zeichen und
1120 poke fs+ve*80+ez*2,fc :rem farbe setzen
1130 goto930
1140 rem********************************
1150 rem auswertung des codes
1160 pokevic+21,0 :rem sprite aus
1170 pokesid+4,17 :rem stimme ein
1180 fori=1to5
1190 pokesid,157:pokesid+1,24
1200 forw=1to20 :nextw
1210 v(i)=peek(fs+ve*80+i*2)and 15
1220 pokesid,20:pokesid+1,26
1230 forw=1to20 :nextw
1240 next
1250 pokesid,157:pokesid+1,24
1260 forw=1to 40:next
1270 pokesid+4,0
1280 tr=0:rf=0
1290 fori=0to14:fx(i)=0:fv(i)=0
1300 forj=1to5
1310 ifx(j)=i then fx(i)=fx(i)+1
1320 ifv(j)=i then fv(i)=fv(i)+1
1330 nextj,i
1340 fori=1to5
1350 ifx(i)=v(i) then tr=tr+1
1360 next
1370 if tr=5 then 1710
1380 fori=0to14
1390 iffx(i)<fv(i)then fv(i)=fx(i)
1400 rf=rf+fv(i)
1410 next
1420 rf=rf-tr
1430 rem anzeige der treffer
1440 poke214,2+ve*2:poke211,28:sys cs
1450 pokesid,109:pokesid+1,16
1460 iftr=0 then 1540:rem kein treffer
1470 fori=1totr
1480 pokesid+4,17
1490 printtr$;
1500 forw=1to150:nextw
1510 pokesid+4,0
1520 forw=1to100:next
1530 nexti
1540 ifrf=0 then 1630:rem keine richtige farbe
1550 fori=1torf
1560 pokesid+4,17
1570 printrf$;
1580 forw=1to150:nextw
1590 pokesid+4,0
1600 forw=1to100:nextw
1610 nexti
1620 goto 910
1630 iftr then 1690
1640 pokesid,55:pokesid+1,8
1650 pokesid+4,17
1660 printchr$(151);"[195]"
1670 forw=1to200:nextw
1680 pokesid+4,0
1690 goto 910
1700 rem********************************
1710 pokevic+21,0:gosub3290
1720 forwi=1to4
1730 pokesid,109 :pokesid+1,16
1740 poke214,2+ve*2:poke211,28:sys cs
1750 print" "
1760 forw=1to300:nextw
1770 pokesid,219 :pokesid+1,32
1780 poke214,2+ve*2:poke211,28:sys cs
1790 printchr$(144);"richtig!!!"
1800 forw=1to300:nextw
1810 nextwi
1820 gosub 3540
1830 gosub2110:rem code zeigen
1840 forw=1to1000:nextw
1850 rem********************************
1860 rem schlussmelodie
1880 pokesid+4,17
1890 pokesid,157:pokesid+1,24
1900 forw=1to200:next
1910 pokesid, 20:pokesid+1,26
1920 forw=1to200:next
1930 pokesid,160:pokesid+1,27
1940 forw=1to200:next
1950 pokesid,3:pokesid+1,31
1960 forw=1to200:next
1970 pokesid,219:pokesid+1,32
1980 pokesid+7,178:pokesid+8,20
1990 pokesid+14,157:pokesid+15,24
2000 pokesid+11,17:pokesid+18,17
2020 forw=1to900:next
2030 gosub3540
2040 :
2050 poke211,2:poke214,24:syscs
2060 print"taste druecken[145]"
2070 gett$:ift$=""then 2070
2080 fl=1:restore:goto 330:rem neustart
2090 sys 65409:poke788,49:end:rem programmende
2100 rem********************************
2110 rem code zeigen
2120 pokesid,109:pokesid+1,16
2130 pokevic,160:pokevic+1,66
2140 pokevic+21,1
2150 fori=1to5
2160 pokesid+4,17
2170 pokevic,144+i*16
2180 poke bs-40+i*2,160
2190 poke fs-40+i*2,x(i)
2200 forw=1to200:next
2210 pokesid+4,0
2220 forw=1to150:next
2230 next
2240 pokevic+21,0
2250 return
2260 rem********************************
2270 rem hilfstaste code zeigen
2280 ifh>=(ve/2)thenh=h-1:goto2310
2290 poke bs-40+h*2,160
2300 poke fs-40+h*2,x(h)
2310 return
2320 rem********************************
2330 rem code nicht gefunden
2340 forw=1to200:nextw
2350 gosub2110
2360 forw=1to200:nextw
2370 poke211,28:poke214,1:sys cs
2380 printchr$(151);"schade!"
2390 forw=1to2000:nextw
2400 goto2040
2410 rem********************************
2420 rem titelbild
2430 restore:printchr$(147)
2440 fori=4to18step 7
2450 pokesid+i,17
2460 fork=1to3
2470 for j=1to4
2480 read fr:pokesid,fr
2490 read fr:pokesid+1,fr
2500 read fr:pokesid+7,fr
2510 read fr:pokesid+8,fr
2520 read fr:pokesid+14,fr
2530 read fr:pokesid+15,fr
2540 a=int(rnd(1)*1000):fw=int(rnd(1)*15)
2550 poke55296+a,fw :poke1024+a,63
2560 forw=1to15:nextw
2570 nextj
2580 restore
2590 nextk
2600 nexti
2610 pokesid,109
2620 pokesid+1,16
2630 pokesid+7,178
2640 pokesid+8,20
2650 pokesid+14,157
2660 pokesid+15,24
2670 poke211,0:poke214,7:syscs
2680 printtab(7)"[154][169] [146] [169] [223][146] [150] [146] [158][169] [223][146] [156] [223][146]"
2690 printtab(7)"[154] [146] [146] [146] [150] [146] [158] [146] [146] [156] [146] [146]"
2700 printtab(7)"[154] [146] [146] [146] [150] [146] [158] [146] [146] [156] [146][169]"
2710 printtab(7)"[154] [146] [146] [146] [150] [146] [158] [146] [146] [156] [146] [146][187]"
2720 printtab(7)"[154][223] [146] [223] [146][169] [150] [146] [158][223] [146][169] [156] [146] [188] [146]"
2730 print:print:printchr$(151)
2740 printtab(10)"[169] [146] [169] [223][146] [223][146] [146]"
2750 printtab(10)" [146] [146] [146] [146] [146] [146]"
2760 printtab(10)" [146] [146] [146] [146] [146] [146]"
2770 printtab(10)" [146] [146] [146] [146] [146] [146]"
2780 printtab(10)"[223] [146] [223] [146][169] [146][169] [146]"
2790 forw=0to 700:nextw
2800 return
2810 rem********************************
2820 rem abfrage auf anleitung und schwierigkeitsgrad
2830 rem
2890 printchr$(147)
2892 poke211,3:poke214,5:syscs
2894 print"bitte waehlen sie:"
2900 poke211,3:poke214,10:sys cs
2910 print"schwierigkeitsgrad (1 oder 2) ?"
2920 poke198,0
2930 gett$:sg=val(t$)-1
2940 ifsg<0orsg>1 then 2930
2950 return
3270 rem********************************
3280 rem melodie bei gefundenem code
3290 restore
3300 fori=4to18 step7
3310 pokesid+i,17
3320 fork=1to3
3330 for j=1to4
3340 read fr:pokesid,fr
3350 read fr:pokesid+1,fr
3360 read fr:pokesid+7,fr
3370 read fr:pokesid+8,fr
3380 read fr:pokesid+14,fr
3390 read fr:pokesid+15,fr
3400 forw=1to30:nextw
3410 nextj
3420 restore
3430 nextk
3440 nexti
3450 pokesid,109
3460 pokesid+1,16
3470 pokesid+7,178
3480 pokesid+8,20
3490 pokesid+14,157
3500 pokesid+15,24
3510 return
3520 rem********************************
3530 rem alle stimmen aus
3540 pokesid+4,0:pokesid+11,0:pokesid+18,0:return